<template>
  <div class="product"  >
    <div class="left">
      <slot name="picture"></slot>
    </div>
    <div class="right">
      <slot name="info"></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'ProductIndex',
  methods: {
    proDetail () {
      this.$router.push('/proDetail')
    }
  }
}
</script>
<style>
.product {
  display: flex;
  gap: 20px; /* 添加元素之间的间距 */
  align-items: center; /* 垂直居中对齐 */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background-color: #f9f9f9;
  margin: 30px 0; /* 添加外边距 */
}
.left {
  width: 30%;
  overflow: hidden; /* 防止图片超出边界 */
  border-radius: 8px; /* 圆角效果 */
}
.right {
  width: 50%;
}
.left img {
  width: 100%;
  height: 150px;
}
.right h3 {
  font-size: 18px;
  color: #333;
  font-weight: bold;
  margin-bottom: 12px;
}

.right p {
  font-size: 16px;
  color: #666;
  margin-bottom: 12px;
  transition: color 0.3s; /* 平滑颜色过渡效果 */
  cursor: pointer;
}

.right p:hover {
  color: #333;
  cursor: pointer;
}
</style>
